package com.ytktt.study.week9.task3.rpcfx.registry;

import com.ytktt.study.week9.task3.rpcfx.api.ServiceProviderDesc;

/**
 * 注册中心
 *
 * @author ytk
 */
public interface Registry {

    /**
     * 获取服务url
     *
     * @param serviceName the service name
     * @param group
     * @param version
     * @return the service url
     */
    String getServiceUrl(String serviceName, String group, String version) throws Exception;

    /**
     * 注册服务
     *
     * @param serviceProviderDesc the service provider desc
     * @throws Exception the exception
     */
    void registryService(ServiceProviderDesc serviceProviderDesc) throws Exception;
}
